package com.raven.craft.code.generator.project.antijson.type;

import java.util.Collections;
import java.util.Set;

/**
 * 空数组对象时的元数类型
 * 用于 ArrayType.elementType
 *
 * @author raven
 * @date 2020/09/21
 **/
public class EmptyElementType implements Type {
    private EmptyElementType() {
    }

    public static EmptyElementType getInstance() {
        return SingletonHolder.INSTANCE;
    }

    @Override
    public Set<String> getImports() {
        return Collections.emptySet();
    }

    @Override
    public String getName() {
        return "?";
    }

    private static class SingletonHolder {
        private static final EmptyElementType INSTANCE = new EmptyElementType();
    }
}
